<?php
   
    require_once '../include.php';
    $conexao = new Conexao();
    
    extract($_POST);
    
    $query = "DELETE FROM posicao WHERE idPosicao = $idPosicao";

    $result = mysql_query($query);    
    
    if($idPosicao == $_SESSION['usuario']['posicaoInicial']['idPosicao']){
	$_SESSION['usuario']['posicaoInicial']['idPosicao'] = 0;	    
	$_SESSION['usuario']['posicaoInicial']['lat'] = -22.950944078667128;	    
	$_SESSION['usuario']['posicaoInicial']['lng'] = -43.18862902539058;
	$_SESSION['usuario']['posicaoInicial']['zoom'] = 13;
    }
    
    $usaMesmaConexao = true;
    
    include("getPosicoes.php");
?>
